package com.niiwoo.activity.event.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description 标的申请来源（1、APP，2、H5活动，3、H5极速借, 4、融360）
 * @Author zq
 * @Date 2018/3/28
 */
@Getter
@AllArgsConstructor
public enum ProjectFromSourceEventEnum {

    APP(Byte.valueOf("1"), "APP"),
    H5_ACTIVITY(Byte.valueOf("2"), "H5活动"),
    H5_SPEED_LOAN(Byte.valueOf("3"), "H5极速借"),
    R360(Byte.valueOf("4"), "融360"),
    CARD_NIU(Byte.valueOf("5"), "卡牛");

    private Byte type;

    private String desc;

    public static ProjectFromSourceEventEnum valueOf(Byte status) {
        for (ProjectFromSourceEventEnum typeEventEnum : ProjectFromSourceEventEnum.values()) {
            if (status.byteValue() == typeEventEnum.getType()) {
                return typeEventEnum;
            }
        }
        return null;
    }
}
